<!DOCTYPE html>
<html class="pixel-ratio-3 retina android android-5 android-5-1-1">
<head>
    <title>问诊单</title>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="description" content="">

    <link rel="stylesheet" href="../../lib/weui.min.css">
    <link rel="stylesheet" href="../../css/jquery-weui.css">
    <link rel="stylesheet" href="../../css/home.css">
    <link rel="stylesheet" href="../../plugins/fontaw/css/font-awesome.css">
    <style>

        .weui-textarea{font-size:0.6rem;margin-top: 0.4rem;background-color: #eeeeec;padding:0.3rem;color:grey;width: 97%}
        textarea::-webkit-input-placeholder{
            color: #999;
        }
        textarea::-moz-placeholder{
            color: #999;
        }
        textarea:-moz-placeholder{
            color: #999;
        }
        .div-text-area{padding:0.6rem;color: grey}
        .upload-zone{padding:0.6rem;color: grey}
        p{color:#999}
        .item_block{
            width:4rem;height: 4rem;border:lightgray dashed 0.03rem; border-radius: 3%;margin-top: 0.3rem ;
            text-align: center;font-size: 0.6rem;color: grey;display:inline-block;padding-top:0.2rem
        }
        .item_block span{display: block;}
        .item_block p{padding:0.3rem}
        .patient-basic{font-size:0.6rem;color: #3d4145}
        .td_label{text-align: right;color:#999;padding-right: 0.3rem;width:4.4rem;height: 1.5rem}
    </style>
</head>
<body ontouchstart>
<form action="/inquiry/createInquiry" method="post" id="dataForm" enctype="multipart/form-data">
    <input type="text" name="inquiryId" id="inquiryId" />
    <div class="weui-flex">
        <div class="weui-flex__item" id="patient_info">
            <div class="weui-loadmore">
                <i class="weui-loading"></i>
                <span class="weui-loadmore__tips">加载用户信息...</span>
            </div>
        </div>
    </div>

    <div class="weui-panel weui-panel_access">
        <div class="weui-panel__hd">病状和病史<span style="float: right;color:darkred"><i class="fa fa-download" aria-hidden="true"></i> <a style="color:darkred">载入上次问诊单</a></span></div>
        <div class="weui-panel__bd">
            <div class="div-text-area">
                <p style="color:#63625e">初诊包括发病时间、起因、病程经过、治疗用药、复诊包括上次用药后变化</p>
                <textarea class="weui-textarea" name="description" placeholder="请由重到轻描述本次不舒服或最想治疗的症状。（内容最大不超过2000字）" rows="4"></textarea>
            </div>

            <div class="upload-zone">
                <p style="color:#63625e">请上传舌苔和舌底照片，如果是儿童可上传三关手纹照片替代（选填）</p>
                <p>拍照时建议选用后置摄像头，关闭美颜功能</p>
                <p>请在自然光线下拍摄，拍照尽量长大嘴巴</p>
                <p>拍舌苔时，舌头向下伸长</p>
                <p>拍舌底时，舌头向上抬起</p>
                <div style="margin-bottom: 0.5rem">
                    <div  id="imgChoose">

                    </div>
                    <span ><a href="javascript:;"> 查看示例</a></span>
                </div>

                <p style="color:#63625e">病患处报告、化验单(选填)</p>
                <p>还可以上传病患处 或相关都检查报告 ，化验单</p>
                <div style="margin-bottom: 0.5rem">
                    <div  id="inquiryChoose">

                    </div>
                </div>

                <p style="color:#63625e">请上传面部照片（选填）</p>
                <p>请在自然光线下拍摄，并关闭美颜功能，以便医生诊断</p>
                <div style="margin-bottom: 0.5rem">
                    <div  id="faceChoose">

                    </div>
                </div>
            </div>
        </div>

        <div class="weui-btn-area">
            <a class="weui-btn weui-btn_primary" href="javascript:;" id="nextBtn"> 下一步 </a>
        </div>
    </div>

</form>


<script src="/lib/jquery-2.1.4.js"></script>
<script src="/lib/jquery.form.js"></script>
<script src="/js/jquery-weui.js"></script>
<script type="text/javascript" src="/plugins/cropper/js/lrz.all.bundle.js"></script>
<script src="/js/home.js"></script>

<script>
    var patientId = getQueryString("patientId");
    $(document).ready(function(){
        $("#imgChoose").h5upload({
            exts: ['jpg', 'gif', 'png', 'jpeg'],
            max: 2,
            size: 3145728,
            del: true,
            name: 'tongue' //input name
        });

        $("#faceChoose").h5upload({
            exts: ['jpg', 'gif', 'png', 'jpeg'],
            max: 1,
            size: 3145728,
            del: true,
            name: 'faceImg' //input name
        });

        $("#inquiryChoose").h5upload({
            exts: ['jpg', 'gif', 'png', 'jpeg'],
            max: 3,
            size: 3145728,
            del: true,
            name: 'woundImg' //input name
        });
        loadPatientInfo();
        $("#nextBtn").click(nextStep);
    });

    function loadPatientInfo(){
        $.ajax({
            url:"/patient/getPatientForPage",
            data:{"patientId":patientId},
            success:function (da){
                $("#patient_info").html(da);
            }
        });
    }

    function toBasicUpd(){
        location.href="/patient/toPatientUpd?patientId="+patientId;
    }

    function nextStep(){
        console.log("22");
        $("#dataForm").trigger("submit");
    }
    $(function(){

    })
</script>
</body>
</html>